using MediatR;
using B.S.XZYData.ErrorCode;

namespace B.S.XZYData.Api.Wrter.Application.Command.Route
{
    /// <summary>
    /// 批量删除工艺路线命令
    /// </summary>
    public class BatchDeleteRouteCommand : IRequest<ApiResult<BatchDeleteRouteResult>>
    {
        /// <summary>
        /// 工艺路线ID列表
        /// </summary>
        public List<int> RouteIds { get; set; } = new List<int>();

        /// <summary>
        /// 操作人
        /// </summary>
        public string OperateBy { get; set; } = string.Empty;
    }

    /// <summary>
    /// 批量删除工艺路线结果
    /// </summary>
    public class BatchDeleteRouteResult
    {
        /// <summary>
        /// 成功删除的路线ID列表
        /// </summary>
        public List<int> SuccessRouteIds { get; set; } = new List<int>();

        /// <summary>
        /// 失败的路线信息列表
        /// </summary>
        public List<FailedRouteInfo> FailedRoutes { get; set; } = new List<FailedRouteInfo>();

        /// <summary>
        /// 总处理数量
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 成功数量
        /// </summary>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败数量
        /// </summary>
        public int FailedCount { get; set; }
    }

    /// <summary>
    /// 失败的路线信息
    /// </summary>
    public class FailedRouteInfo
    {
        /// <summary>
        /// 路线ID
        /// </summary>
        public int RouteId { get; set; }

        /// <summary>
        /// 失败原因
        /// </summary>
        public string Reason { get; set; } = string.Empty;
    }
} 